package org.distribute.meal.controller;

import org.distribute.meal.service.MealService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MqController {
	private final static Logger logger = LoggerFactory.getLogger(MqController.class);
	
	@Autowired
	private MealService mealService;
	
	@GetMapping("/direct")
	@ResponseBody
	public String direct(int num) throws Exception {
		int res = mealService.addMeal("1", "1","1");
		logger.info("res: " + res);
		
		return "direct suc: " + System.currentTimeMillis();
	}
}
